package com.hxxy.wyp.petsLover.security;

import cn.dev33.satoken.stp.StpInterface;
import com.hxxy.wyp.petsLover.common.services.base.backend.AdminService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName StpInterfaceImpl
 * @Description 自定义权限验证接口扩展
 * @Author wyp
 * @Date 2022/12/21 17:20
 * @Version 1.0
 */
@Component
public class StpInterfaceImpl implements StpInterface {
    @Resource
    private AdminService adminService;

    @Override
    public List<String> getPermissionList(Object loginId, String loginType) {
        return adminService.getAdminPermissions((String) loginId);
    }

    @Override
    public List<String> getRoleList(Object loginId, String loginType) {
        return adminService.getAdminRole((String) loginId);
    }
}
